{% extends "admin/admin_base.html" %}


{% block content %}
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/mdui@1.0.1/dist/css/mdui.min.css"
  integrity="sha384-cLRrMq39HOZdvE0j6yBojO4+1PrHfB7a9l5qLcmRm/fiWXYY+CndJPmyu5FV/9Tw"
  crossorigin="anonymous"
/>

<div class="box box-success">
    <div class="box-header with-border">
        <i class="fa fa-book"></i>
        <h3 class="box-title">更新机器人固件</h3>
    </div>

    <div class="box-body">

        <!-- 数据表格 -->
        <!-- <div class="table-box"> -->
        <div class="mdui-table-fluid">

            <!--数据列表-->
            <!-- <table id="dataList" class="table table-bordered table-striped table-hover dataTable"> -->
            <table id="dataList" class="mdui-table mdui-table-hoverable">
                <thead>
                <tr>
                    <th class="">id</th>
                    <th class="">名称</th>
                    <th class="text-center mdui-table-col-numeric">操作</th>

                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>1</td>
                    <td>恢复ROS固件初始化</td>
                     <td class="text-center">
                      <form action="{{url_for('admin.initialization_ros_firmware')}}" method="POST"
                         enctype="multipart/form-data">
                        <!-- <input type="submit" class="btn bg-olive btn-xs" style="width: 290px;height: 30px" value="恢复初始化"/> -->
                        <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-green mdui-text-color-white">恢复初始化</button>
                        </form>
<!--                        <a class="btn bg-danger btn-xs"-->
<!--                           href="#">回复初始化-->
<!--                        </a>-->
                    </td>
                </tr>
                <tr>
                    <td>2</td>
                    <td>上传ROS固件</td>
                      <td class="text-center">
                          <form action="{{url_for('admin.upload_ros_firmware')}}" method="POST" enctype="multipart/form-data">
                             <!-- <div class="btn bg-olive btn-xs" style='width:auto'>
                             <input  type="file" name="file" accept=".tar.gz"/>
                            </div> -->
                            <div class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-green mdui-text-color-white">
                                <span>上传文件</span>
                                <input style="position:absolute;
                                top:0;
                                right:0;
                                margin:0;
                                border:solid transparent;
                                opacity:0;
                                filter:alpha(opacity=0);
                                cursor: pointer;" type="file"  name="file" accept=".tar.gz"/>
                            </div>
                            
                        <!-- <input type="submit"  class="btn bg-olive btn-xs"value="更新"/> -->
                        <button style="width: 104.81px;margin-left: 20px;" class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-green mdui-text-color-white">更新</button>
                    </form>
                    </td>
                </tr>
                <tr>
                    <td>3</td>
                    <td>上传驱动板固件</td>
                    <td class="text-center">
                        <form action="{{url_for('admin.upload_drive_firmware')}}" method="POST"  enctype="multipart/form-data">
                            <div class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-green mdui-text-color-white">
                                <span>上传文件</span>
                            <input style="position:absolute;
                            top:0;
                            right:0;
                            margin:0;
                            border:solid transparent;
                            opacity:0;
                            filter:alpha(opacity=0);
                            cursor: pointer;" type="file"  name="file" accept=".tar.gz"/></div>
                        <!-- <div class="btn bg-olive btn-xs" style='width: auto'>
                         <input type="file"  name="file" accept=".tar.gz"/>
                     </div> -->
                     <button style="width: 104.81px;margin-left: 20px;" class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-green mdui-text-color-white">更新</button>
        </form>
                    </td>
                </tr>
                     <tr>
                    <td>4</td>
                    <td>重启机器人</td>
                    <td class="text-center">
                        <form action="{{url_for('admin.restart_robot')}}" method="POST" enctype="multipart/form-data" style="color: #00a65a">
                       <div >
<style>
    .mdui-select-menu-item[selected] {
        color: #4caf50;
    }
</style>
    <select class="mdui-select" mdui-select="{position: 'top'}" name="mode">
        <option value="1">硬重启</option>
        <option value="2">软重启</option>
        <option value="3">重启传感器</option>
    </select>



                         <!-- <input  type="radio" value="1" name="mode"/>硬重启
                         <input type="radio" value="2" name="mode"/>软重启
                         <input type="radio" value="3" name="mode"/>重启传感器 -->
                          <!-- <input type="submit" value="确定"/> -->
                          <button style="width: 104.81px;margin-left: 20px;" class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-green mdui-text-color-white">确定</button>
                      </div>
                       </form>
<!--                        &lt;!&ndash; Single button &ndash;&gt;-->
<!--                        <div class="btn-group">-->
<!--                          <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="width: 290px;height: 30px">-->
<!--                            请选择 <span class="caret"></span>-->
<!--                          </button>-->
<!--                          <ul class="dropdown-menu">-->
<!--                            <li><a href="{{url_for('admin.restart_robot')}}">硬重启</a></li>-->
<!--                            <li><a href="{{url_for('admin.restart_robot')}}">软重启</a></li>-->
<!--                            <li><a href="{{url_for('admin.restart_robot')}}">重启传感器</a></li>-->
<!--&lt;!&ndash;                            <li role="separator" class="divider"></li>&ndash;&gt;-->
<!--&lt;!&ndash;                            <li><a href="#">Separated link</a></li>&ndash;&gt;-->
<!--                          </ul>-->
<!--                        </div>-->
                    </td>
                </tr>
<!--                {% for user in user_queryset %}-->
<!--                <tr>-->
<!--                    <th>1</th>-->
<!--                    <th>2</th>-->

<!--                    <td class="text-center">-->
<!--                        <a class="btn bg-olive btn-xs" href="{{url_for('admin.edit_user',id=user.id)}}">编辑-->
<!--                        </a>-->
<!--                        <a class="btn bg-danger btn-xs"-->
<!--                           href="{{url_for('admin.delete_user',id=user.id)}}">删除-->
<!--                        </a>-->
<!--                    </td>-->
<!--                </tr>-->
<!--                {% endfor %}-->

                </tbody>
            </table>
            <!--数据列表/-->

        </div>
        <!-- 数据表格 /-->

    </div>
    <!-- /.box-body -->

</div>
<!-- MDUI JavaScript -->
<script
  src="https://cdn.jsdelivr.net/npm/mdui@1.0.1/dist/js/mdui.min.js"
  integrity="sha384-gCMZcshYKOGRX9r6wbDrvF+TcCCswSHFucUzUPwka+Gr+uHgjlYvkABr95TCOz3A"
  crossorigin="anonymous"
></script>
{% endblock %}

